//
//  UIEventEx.m
//  STM
//
//  Created by  xuchen(陈旭)， xichen(陈曦)， qq：511272827 on 10-10-22.
//  Copyright 2010 cc_team.com. All rights reserved.
//
#include "CCAll.h"

#ifdef	OBJC_MACRO
#import "CCUIEvent.h"

// 获取触摸的view
UIView *getTouchView(const NSSet *touches)
{
	assert(touches != nil);
	
	UITouch *touch = [touches anyObject];
	return touch.view;
}

@implementation UIEventEx

//获取在指定视图中触摸的位置坐标，如： x为20, y为45
+ (CGPoint)getTouchPoint:(UIView *)view withEvent:(UIEvent *)event
{
	UITouch *touch = [[event allTouches] anyObject];
	return [touch locationInView:view];
}

@end

#endif	//OBJC_MACRO
